<template>
    <div>
        用户名:<input type="text" name="" id="" v-model='username'>
        <br>
        密码: <input type="password" v-model='password'>

        <button @click='submit'>提交</button>
    </div>
</template>

<script>
    export default{
        data() {
            return {
                username:'',
                password:'',
            }
        },
        methods: {
            //提交
            submit:function(){
                this.axios.get('http://127.0.0.1:8000/register_week/',{params:{
                    username:this.username,password:this.password
                }}).then((result)=>{
                    console.log('注册成功')

                    alert(result.data.message)
                })

            }
        },

    }
</script>

<style>

</style>